#include<bits/stdc++.h>
using namespace std;
int a[100009];
int b[100009];
int n;
int mao(int k)
{
    int h;
    if(k>=n) return 0;
    if(a[k]>a[k+1])
    {
       h=a[k+1];
       a[k+1]=a[k];
       a[k]=h;
       return mao(k+1);
    }
    else return 0;
}
int pao(int x,int y)
{
    if(y>n) return 0;
    if(a[x]<a[y]&&b[y]!=1)
    {
        b[y]=1;
        return 1;
    }
    else return pao(x,y+1);
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int i,j=0;
    cin>>n;
    for(i=1;i<=n;i++) cin>>a[i];
    for(i=n-1;i>=1;i--) mao(i);
    for(i=1;i<=n;i++) j+=pao(i,i+1);
    cout<<n-j;
    return 0;
}
